Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add &display=swap to googlefont URLs #2097

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

ciderpunx
Copy link

@ciderpunx ciderpunx commented May 18, 2023

Google fonts will add font-display: swap if you pass a parameter to it. This fixes FOIT in many modern browsers which probably makes the user experience a little better.

This PR just adds the display=swap parameter to the two places where the google font URL is used.

As I understand it this shouldn't be a problem for older browsers, and will be better on newer ones.

How to test the changes in this Pull Request:

You could review the score given on google's pagespeed tool. Before patch you will get a fail on " All text remains visible during webfont loads ", after the patch you won't.

Changelog

Improvement – Add &display=swap to googlefont URLs

Google fonts will add font-display: swap if you pass a parameter to it. This fixes FOIT in many modern browsers which probably makes the user experience a little better.

This PR just adds the display=swap parameter to the two places where the google font URL is used.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant